<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Retrieves information about opcode cache memory usage</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.wincache-ocache-fileinfo.html">« wincache_ocache_fileinfo</a></li>
      <li style="float: right;"><a href="function.wincache-refresh-if-changed.html">wincache_refresh_if_changed »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="ref.wincache.html">WinCache 函数</a></li>
    <li>Retrieves information about opcode cache memory usage</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="function.wincache-ocache-meminfo" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">wincache_ocache_meminfo</h1>
  <p class="verinfo">(PECL wincache &gt;= 1.0.0)</p><p class="refpurpose"><span class="refname">wincache_ocache_meminfo</span> &mdash; <span class="dc-title">
   Retrieves information about opcode cache memory usage
  </span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.wincache-ocache-meminfo-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>wincache_ocache_meminfo</strong></span>(): <span class="type"><span class="type">array</span>|<span class="type"><span class="type false">false</span></span></span></div>

  <p class="para rdfs-comment">
   Retrieves information about memory usage by opcode cache.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.wincache-ocache-meminfo-parameters">
  <h3 class="title">参数</h3>
  <p class="para">此函数没有参数。</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.wincache-ocache-meminfo-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Array of meta data about opcode cache memory usage  或者在失败时返回 <strong><code>false</code></strong>
  </p>
  <p class="para">
   The array returned by this function contains the following elements:
   <ul class="itemizedlist">
    <li class="listitem">
     <span class="simpara">
      <code class="literal">memory_total</code> - amount of memory in bytes allocated for the opcode cache
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <code class="literal">memory_free</code> - amount of free memory in bytes available for the opcode cache
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <code class="literal">num_used_blks</code> - number of memory blocks used by the opcode cache
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <code class="literal">num_free_blks</code> - number of free memory blocks available for the opcode cache
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <code class="literal">memory_overhead</code> - amount of memory in bytes used for the opcode cache internal structures
     </span>
    </li>
   </ul>
  </p>
  <div class="warning"><strong class="warning">警告</strong><p class="simpara">该函数已在 PHP 7.0.0 中
<em class="emphasis">移除</em>。</p></div>
 </div>


 <div class="refsect1 examples" id="refsect1-function.wincache-ocache-meminfo-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-657">
    <p><strong>示例 #1 A <span class="function"><strong>wincache_ocache_meminfo()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
&lt;pre&gt;<br /><span style="color: #0000BB">&lt;?php<br />print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">wincache_ocache_meminfo</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?&gt;<br /></span>&lt;/pre&gt;</span>
</code></div>
    </div>

    <div class="example-contents"><p>以上例程会输出：</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
Array
(
    [memory_total] =&gt; 134217728
    [memory_free] =&gt; 112106972
    [num_used_blks] =&gt; 15469
    [num_free_blks] =&gt; 4
    [memory_overhead] =&gt; 247600
)
</pre></div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.wincache-ocache-meminfo-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.wincache-fcache-fileinfo.html" class="function" rel="rdfs-seeAlso">wincache_fcache_fileinfo()</a> - Retrieves information about files cached in the file cache</span></li>
    <li class="member"><span class="function"><a href="function.wincache-fcache-meminfo.html" class="function" rel="rdfs-seeAlso">wincache_fcache_meminfo()</a> - Retrieves information about file cache memory usage</span></li>
    <li class="member"><span class="function"><a href="function.wincache-ocache-fileinfo.html" class="function" rel="rdfs-seeAlso">wincache_ocache_fileinfo()</a> - Retrieves information about files cached in the opcode cache</span></li>
    <li class="member"><span class="function"><a href="function.wincache-rplist-fileinfo.html" class="function" rel="rdfs-seeAlso">wincache_rplist_fileinfo()</a> - Retrieves information about resolve file path cache</span></li>
    <li class="member"><span class="function"><a href="function.wincache-rplist-meminfo.html" class="function" rel="rdfs-seeAlso">wincache_rplist_meminfo()</a> - Retrieves information about memory usage by the resolve file path cache</span></li>
    <li class="member"><span class="function"><a href="function.wincache-refresh-if-changed.html" class="function" rel="rdfs-seeAlso">wincache_refresh_if_changed()</a> - Refreshes the cache entries for the cached files</span></li>
    <li class="member"><span class="function"><a href="function.wincache-ucache-meminfo.html" class="function" rel="rdfs-seeAlso">wincache_ucache_meminfo()</a> - Retrieves information about user cache memory usage</span></li>
    <li class="member"><span class="function"><a href="function.wincache-ucache-info.html" class="function" rel="rdfs-seeAlso">wincache_ucache_info()</a> - Retrieves information about data stored in the user cache</span></li>
    <li class="member"><span class="function"><a href="function.wincache-scache-info.html" class="function" rel="rdfs-seeAlso">wincache_scache_info()</a> - Retrieves information about files cached in the session cache</span></li>
    <li class="member"><span class="function"><a href="function.wincache-scache-meminfo.html" class="function" rel="rdfs-seeAlso">wincache_scache_meminfo()</a> - Retrieves information about session cache memory usage</span></li>
   </ul>
  </p>
 </div>


</div></div></div></body></html>